<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                                                                                    rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/star">首页</a>
                </li>
                <li>
                    <a href="#/bcp/alert/alert_rule_list">报警规则</a>
                </li>
                <li class="active">规则详细</li>
            </ul>
        </div>
    </div>
</div>

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-12 col-md-12 main">
            <div class="col-md-6 col-md-offset-3">
                <h2 style="text-align: center">报警规则详情信息</h2>
                <form name="form" ng-submit="form.$valid&&setAlertPolicy()" novalidate>
                    <div class="form-group">
                        <label>应用标识</label>
                        <input type="text" class="form-control" name="appCode" ng-model="vm.p.appCode" required />
                        <span ng-show="form.appCode.$error.required" class="help-block" >应用标识!</span>
                    </div>
                    <div class="form-group">
                        <label>报警编码</label>
                        <input type="text" class="form-control" name="ruleCode" ng-model="vm.p.ruleCode" required />
                        <span ng-show="form.ruleCode.$error.required" class="help-block" >报警编码!</span>
                    </div>
                    <div class="form-group">
                        <label>报警名称</label>
                        <input type="text" class="form-control" name="ruleName" ng-model="vm.p.ruleName" required />
                        <span ng-show="form.ruleName.$error.required" class="help-block" >报警名称!</span>
                    </div>
                    <div class="form-group">
                        <label>规则有效日期（默认20200101-20290101）</label>
                        <input type="text" class="form-control" name="validityDays" ng-model="vm.p.validityDays" required />
                        <span ng-show="form.validityDays.$error.required" class="help-block" >规则有效日期!</span>
                    </div>
                    <div class="form-group">
                        <label>规则有效时段(默认00:00-23:59)</label>
                        <input type="text" class="form-control" name="execTime" ng-model="vm.p.execTime" required />
                        <span ng-show="form.execTime.$error.required" class="help-block" >规则有效时段!</span>
                    </div>

                    <div class="form-group">
                        <label>策略参数（频次间隔5分钟）</label>
                        <input type="text" class="form-control" name="alertPolicy" ng-model="vm.p.alertPolicy" required />
                        <span ng-show="form.alertPolicy.$error.required" class="help-block" >策略参数!</span>
                    </div>

                    <div class="form-group">
                        <label>Onduty支持组:
                            <div ng-show="vm.d.type=='code'" style="float:right;">
                                <a href="/onduty/index.html#/star/onduty/resolvegroup_add/code/{{vm.p.duty.resolvegroupId}}" target="_blank"><u>支持组</u></a>,
                                <a href="/onduty/index.html#/star/onduty/cti_add/{{vm.p.duty.ctiId}}" target="_blank"><u>支持项</u></a>
                            </div>
                        </label>
                        <input type="text" class="form-control" name="dutyPolicy" ng-model="vm.p.dutyPolicy" />
                        <span ng-show="form.dutyPolicy.$error.required" class="help-block" >Onduty支持组!</span>
                    </div>

                    <div class="form-group">
                        <label>负责人Email</label>
                        <input type="text" class="form-control" name="ownerEmail" ng-model="vm.p.ownerEmail" required />
                        <span ng-show="form.ownerEmail.$error.required" class="help-block" >负责人Email!</span>
                    </div>

                    <div class="form-group">
                        <input ng-show="vm.d.type!='code'" class="btn btn-primary" type="submit" value="确定"/>
                        <a href="#/bcp/alert/alert_rule_list" class="btn btn-default">取消</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div><!--/.container-->
